# Compiling all examples
TOPTARGETS := all clean

#SUBDIRS := $(wildcard */.)
SUBDIRS :=	can_test \
			gdma_test \
			gmac_test \
			i2c_eeprom \
			letter_shell_test \
			lwip_test \
			mci_test \
			pcie_test \
			qspi_nor_flash \
			sdci_test \
			spi_test


$(TOPTARGETS): $(SUBDIRS)
	@for i in $(SUBDIRS); do \
	echo -e "\033[44;37;1m +++ Compiling $$i...\033[0m"; \
	$(MAKE) -C $$i $(MAKECMDGOALS) > /dev/null || exit $$?; \
	echo -e "\033[44;37;1m +++ Compiled OK $$i...\033[0m"; \
	done

.PHONY: $(TOPTARGETS) $(SUBDIRS)